package com.meilai.project.mapper.personal.mission;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.meilai.project.entity.personal.mission.MissionRecord;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * @Author ljy
 * @Date 2022/3/30 22:30
 */
@Mapper
public interface MissionRecordMapper extends BaseMapper<MissionRecord> {
    @Update("update mission_record set deleted_at = NOW() where mission_id = #{mission_id} and deleted_at is NULL")
    int deleteBeforeRecords(@Param("mission_id") Long mission_id);

    int deleteBeforeRecordsByIds(@Param("mission_ids") List<Long> mission_ids);
}
